home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.3 KB | 55 lines | [TEXT/GEOL] |
- Item 8671166 26-Feb-90 18:36PST
-
- From: MADA2 MacApp Dev Assoc, Curtis Faith,IVC
-
- To: MACAPP.TECH$ MacApp Technical
- MACAPP.TEST MacApp SQA Team
- MACDTS Macintosh Developer Tech. Supt.
-
- Sub: ClickCount Bug
-
- I believe that there is a bug in the current implementation of click counting.
-
- I was running into a problem with my TreeSaver application in a TTextListView
- when the user double-clicked, did not release after the second click, moved the
- mouse considerably thereby highliting another cell and then released it. The
- effect of this was that gClickCount was 2, but the mouse was released in an
- entirely different section of the list.
-
- Now for clickcounts of 2 or more my code would normally assume that the cell in
- question is already selected. Thus it does not bother reinstalling the
- associated data.
-
- This is not enough. It is in fact possible for gClickCount to be greater than
- 1 when the mouse is actually many cells away.
-
- 2 changes should be made to MacApp:
-
- 1) ClickCounts should be dependent on the mouse-up coordinates. It is not
- sufficient to rely on moused-down coordinates, since one can move the mouse
- considerably.
-
- 2) ClickCount time should also be dependant on the time of the 2nd (or 3rd)
- mouse release. It should not be considered a double click if the mouse remains
- down for an extended period of time after the mouse down.
-
- This is not as trivial a change as it might seem. The current implementation
- checks the clickCount in TApplication.HandleMouseDown. This is before the
- mouse has been released. The mouse won't actually have been released until
- after the StillDown loop at the end of TApplication.TrackMouse.
-
- Thus it is not until TrackRelease that a Command would have a chance to know
- for certain that it was dealing with a legitimate multiple-click.
-
- I propose that a test be placed inside TrackMouse to double check the
- clickCount after TrackRelease and decrement it if CountClicks thought it was a
- multiple-click and the conditions are no longer met on mouse release.
-
- It would be up to each mouse command that depended on a click-Count to wait
- until track-release to do any multi-click specialized actions.
-
- Regards,
-
- Curtis
-
-